﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<%@ Import Namespace="OAclient.Common" %>
<div id="cardlist">
 
            <table id="cardlist_content" cellspacing="0" cellpadding="0"
                border="0">
                <tr>
                    <th>
                        标题
                    </th>
                    <th>
                        发帖人
                    </th>
                    <th>
                        回帖数
                    </th>
                    <th>
                        发起时间
                    </th>
                </tr>
                <%var cards = ViewData["dt_cards"] as List<CommonLibrary.DataModel.BBS.InitCardEntity>;
                  if (cards != null)
                  {
                      Int32 rowsCount = cards.Count;
                      for (int rowIndex = 0; rowIndex < rowsCount; rowIndex++)
                      {%>
                <tr>
                    <td >
                        <%=Html.ActionLink(cards[rowIndex].CardTitle, "CheckCard", new { inCardId = cards[rowIndex].CardId, page = 1 })%>
                        <%if (ViewData["mng"] == "true")
                          { %>
                        <%=Html.ActionLink("标记热门", "MarkHot", new { inCardId = cards[rowIndex].CardId})%>
                        <%=Html.ActionLink("删除帖子", "DelInitCard", new { inCardId = cards[rowIndex].CardId})%>
                        <%} %>
                    </td>
                    <td >
                        <%=cards[rowIndex].User.name%>
                    </td>
                    <td >
                        <%=cards[rowIndex].ReplyCount%>
                    </td>
                    <td >
                        <%=cards[rowIndex].InitTime%>
                    </td>
                </tr>
                <%}
          }%>
            </table>
</div>
<div id="pager">
    <%var pageInfo = ViewData["pageInfo"] as PagingInfo; %>
    <%if (pageInfo != null)
      { %>
    <%=Ajax.PageLinks(pageInfo, index => Url.Action("QueryAllInitCard", new { page = index }), new AjaxOptions { UpdateTargetId = "Cards" })%>
    <%} %>
</div>
